package com.open.capacity.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;

@Service
public class SendMailService {
    @Autowired
    private JavaMailSender javaMailSender;
    public  void  sendMail(String mail){
        SimpleMailMessage message=new SimpleMailMessage();
        message.setSubject("欢迎注册,请等待审核");
        message.setFrom("508930729@qq.com");
        message.setTo(mail);
        message.setText("谢谢");
        javaMailSender.send(message);
    }

}
